import config from "./Config";

export default self => {
  return {
    config: config(self),
    formData: {
      year: "",
      month: "",
      admdvs: "",
      fixmedinsCode: []
    },
    button: {
      submit: {
        label: "查询(Q)",
        accesskey: "Q",
        func: formData => {
          self.search({ ...formData, currentPage: 1, pageSize: Utils.Consts.PAGE_SIZE });
        }
      },
      reset: {
        label: "",
        accesskey: "R",
        func: () => {
          self.searchParams.formData = {
            fixmedinsCode: [],
            year: "",
            month: "",
            currentPage: 1,
            pageSize: Utils.Consts.PAGE_SIZE
          };
          self.tableParams.tableData = [];
          self.search(self.searchParams.formData);
        }
      }
    },
    searchLayoutParam: {
      row: 3,
      col: 2
    }
  };
};
